package br.edu.ufcg.msnlab2.grupo07.monteCarlo;

import java.util.Map;

import br.edu.ufcg.msnlab2.MSNLabException;
import br.edu.ufcg.msnlab2.misc.Function;


/**
 * This interface represents the interface of the MISER Monte Carlo
 * algorithm to estimate integral values.
 * @author David Candeia
 * @author Felipe Leal
 *
 */
public interface MiserMonteCarloSolver {

	/**
	 * This method will request the recursive execution of the MISER algorithm in order to approximate the
	 * integral value
	 * @param function The function expression
	 * @param limits The limits of the integral for each variable
	 * @param numberOfPoints The number of points to be sampled
	 * @return The integral estimative and its error
	 * @throws MSNLabException Exception thrown if any invalid condition occurs while evaluating the function
	 * in the points being considered
	 */
	public MonteCarloResult solve(Function function,	Map<String, Tuple<Double, Double>> limits, long npts, double dith) throws MSNLabException;
	
}
